<extend name="Base/common" />
<block name="Content">
    <div class="am-cf am-padding-top">
        <div class="am-fl am-cf">
            <i class="am-icon-file"></i>
            <strong class="am-text-primary am-text-lg">资金流水</strong>
        </div>
        <hr data-am-widget="divider" class="am-divider am-divider-default" />
    </div>
   
    <div class="am-fr am-padding-right am-u-md-3">
         <form class="am-form" action="{:U('index')}" method="post">
             <div class="am-input-group am-input-group-sm">
                 <input type="text" class="am-form-field am-input-sm" placeholder="站点名称" name='site_name' value="{$site_name}"/>
                 <span class="am-input-group-btn">
                     <button class="am-btn am-btn-default" type="submit">
                         搜索
                     </button>
                 </span>
             </div>
		</form>
    </div>
  
    <table class="am-table am-table-striped am-table-hover table-main">
        <thead>
            <tr>
                <th class="table-type am-text-left" style="width:10%">
                    操作类型
                </th>
                <th class="table-title am-text-left" style="width:10%">
                    金额
                </th>
                <th class="table-title am-text-left" style="width:10%">
                    账户余额
                </th>
                <th class="table-title am-text-left" style="width:10%">
                    订单号
                </th>
                <th class="table-title am-text-left" style="width:15%">
                    服务时间
                </th>
                <th class="table-title am-text-left" style="width:15%">
                    资金状态
                </th>
                <th class="table-set am-text-left" style="width:20%">
                    操作
                </th>
            </tr>
        </thead>
        <tbody>
            <notempty name="list">
                <foreach name="list" item="cash">
                    <tr>
                        <td>
                            <switch name="cash.op_type">
	                            <case value="1">
	                                提现
	                            </case>
	                            <case value="2">
	                                充值
	                            </case>
	                            <case value="3">
	                                微信支付
	                            </case>
	                            <case value="4">
	                                用户支付现金
	                            </case>
	                            <case value="5">
	                                上交现金
	                            </case>
	                        </switch>
                        </td>
                        <td>
                            {$cash.cash}
                        </td>
                        <td>
                            {$cash.balance}
                        </td>
                        <td>
                            {$cash.order_no}
                        </td>
                        <td>
                            <if condition="$cash.emergency eq '2'">
                            	{$cash.delay} 分钟
                            <else/>
                            	{$cash.appointment|date='Y-m-d H:i',###}
                            </if>
                        </td>
                        <td>
                            <if condition="$cash.status eq '2'">
                            	现金支付未上交
                            </if>
                        </td>
                        <td>
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                	<notempty name="cash['order_id']">
	                                    <a class="am-btn am-btn-default am-btn-xs am-text-secondary" 
	                                    	href="{:U('Orders/viewAction?order_id='.$cash['order_id'])}">
	                                    	<span class="am-icon-pencil-square-o"></span>订单详情
	                                    </a>
                                    </notempty>
                                </div>
                            </div>
                        </td>
                    </tr>
                </foreach>
                <else/>
                <td colspan="4" class="text-center">
                    aOh! 暂时还没有内容!
                </td>
            </notempty>
        </tbody>
    </table>
    <!-- 分页 -->
    <ul class="am-pagination am-pagination-default am-no-layout amz-social">
        {$_page}
    </ul>
    <!-- /分页 -->
</block>
<block name="style">
    <style type="text/css">
        .am-table {
            padding-left: 0px;
            margin-left: 0px
        }
    </style>
</block>
